import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.邮箱验证
 */

class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        //或 String emailMatcher="[a-zA-Z\\d]+@[a-zA-Z\\d]+\\.[a-zA-Z\\d]+";
        String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";

        //write your code here......
        if(str.matches(emailMatcher)) {
            System.out.print("邮箱格式合法");
        }else {
            System.out.print("邮箱格式不合法");
        }

    }
}

public class Test {
}
